<template>
  <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="item in banners" :key="item.id">
        <a :href="item.link">
          <img :src="item.image" alt="" @load="imgload">
        </a>
      </van-swipe-item>
    </van-swipe>
</template>

<script>
export default {
props:{
  banners:{
    type:Array
  }
},
methods:{
  imgload(){
    this.$emit('swiperload')
  }
}
}
</script>

<style scoped>
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 15px;
  text-align: center;
  background-color: #39a9ed;
}
.my-swipe .van-swipe-item img{
  width: 100%;
  height: 100%;
}
</style>